using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Watermelon
{
    [System.Serializable]
    public class HoleData : IEquatable<HoleData>
    {
        [SerializeField] Vector3 position;
        public Vector3 Position => position;

        [SerializeField] bool hasScrew;
        public bool HasScrew => hasScrew;

        public HoleData()
        {
        }

        public HoleData(Vector3 position, bool hasScrew)
        {
            this.position = position;
            this.hasScrew = hasScrew;
        }

        public override bool Equals(object obj)
        {
            return Equals(obj as HoleData);
        }

        public bool Equals(HoleData other)
        {
            return other is not null &&
                   Position.Equals(other.Position) &&
                   HasScrew == other.HasScrew;
        }

        public override int GetHashCode()
        {
            return HashCode.Combine(Position, HasScrew);
        }
    }
}
